import { put, call } from 'redux-saga/effects'
import axios from 'axios'
// put === dispatch
// call 发起请求
function * addCount() {
    let res = yield call(axios.get, "/getNum")
    res = res.data
    yield put({ type: "ADD", res })
}

function * delCount() {
    let res = yield call(axios.get, "/getNum")
    res = res.data
    yield put({ type: "DEL", res })
}

export {
    addCount,
    delCount
}